package info.heidao.ww2.api;

import com.alibaba.fastjson.support.retrofit.Retrofit2ConverterFactory;
import com.github.lianjiatech.retrofit.spring.boot.annotation.Intercept;
import com.github.lianjiatech.retrofit.spring.boot.annotation.RetrofitClient;
import com.github.lianjiatech.retrofit.spring.boot.interceptor.LogLevel;
import com.github.lianjiatech.retrofit.spring.boot.interceptor.LogStrategy;
import info.heidao.ww2.api.common.CommonResp;
import info.heidao.ww2.api.interceptor.CookieInterceptor;
import info.heidao.ww2.api.resp.KanGongGuildLogFilterResp;
import info.heidao.ww2.api.resp.KanGongGuildLogResp;
import info.heidao.ww2.api.resp.KanGongGuildReportResp;
import retrofit2.http.GET;
import retrofit2.http.Query;

import java.util.List;
import java.util.concurrent.CompletableFuture;

/**
 * @author: zhengheng
 * @Date: 2021-08-03 15:02
 * @Description:
 */
@RetrofitClient(baseUrl = "${retrofit.endpoints.bigfun}", logLevel = LogLevel.NULL, logStrategy = LogStrategy.NULL, converterFactories = Retrofit2ConverterFactory.class)
@Intercept(handler = CookieInterceptor.class)
public interface BigFunApi {

    /**
     * 获取所有成员
     *
     * @return
     */
    @GET("feweb?target=kan-gong-guild-log-filter/a")
    CompletableFuture<CommonResp<KanGongGuildLogFilterResp>> kanGongGuildLogFilter();

    /**
     * 每日出刀情况
     *
     * @param date 时间
     * @return
     */
    @GET("feweb?target=kan-gong-guild-report/a")
    CompletableFuture<CommonResp<List<KanGongGuildReportResp>>> kanGongGuildReport(@Query("date") String date);

    /**
     * 出刀详情列表
     *
     * @param date
     * @return
     */
    @GET("feweb?target=kan-gong-guild-log/a")
    CompletableFuture<CommonResp<List<KanGongGuildLogResp>>> kanGongGuildLog(@Query("date") String date, @Query("user_id") Long userId,
                                                                             @Query("page") Integer page, @Query("size") Integer size);


}
